﻿@model RTW.OA.Models.user
@{
    ViewBag.Title = "修改密码";
    Layout = "~/Views/Shared/_LayoutBase.cshtml";
}
@section styles{
<style>
    .passwordStrength{

    }
    .passwordStrength b{
    font-weight:normal;
    }
    .passwordStrength b,.passwordStrength span{
    display:inline-block;
    vertical-align:middle;
    line-height:16px;
    line-height:18px\9;
    height:16px;
    }
    .passwordStrength span{
    width:45px;
    text-align:center;
    background-color:#d0d0d0;
    border-right:1px solid #fff;
    }
    .passwordStrength .last{
    border-right:none;
    }
    .passwordStrength .bgStrength{
    color:#fff;
    background-color:#71b83d;
    }
   </style>
}
<div id="dMain">
    <div class="wrapper wrapper-content animated fadeInRight">
        <div class="ibox" style="margin-bottom: 0px;">
            <div class="ibox-title">
                <h4>@ViewBag.Title </h4>
            </div>
            <div class="ibox-content">
                @using (Html.BeginForm("ChangPwd", "Setting", FormMethod.Post, new { area = "Personal", id = "ChangPwdfrom", name = "ChangPwdfrom" }))
                {
                    @Html.AntiForgeryToken()

                    <div class="from-content">
                        <dl>
                            <dt>用户名</dt>
                            <dd>
                                @Html.DisplayFor(m => m.USER_NAME,new { @class = "input normal form-control", datatype = "*", nullmsg = " ", errormsg = " ", sucmsg = " " } )
                            </dd>
                        </dl>
                        <dl>
                            <dt>用户真实姓名</dt>
                            <dd>
                                @Html.DisplayFor(m => m.TRUE_NAME, new { @class = "input normal form-control" } )
                            </dd>
                        </dl>
                        <dl>
                            <dt>登录名</dt>
                            <dd>
                                @Html.DisplayFor(m => m.USER_NO,  new { @class = "input normal form-control" } )
                            </dd>
                        </dl>
                        <dl>
                            <dt>原密码</dt>
                            <dd>
                                @Html.PasswordFor(m => m.OLD_USER_PWD,  new { @class = "input normal form-control" } )
                            </dd>
                        </dl>
                        <dl>
                            <dt>新密码</dt>
                            <dd>
                                @Html.PasswordFor(m => m.USER_PWD,  new { @class = "input normal form-control", plugin = "passwordStrength", datatype = "*6-18", errormsg = "密码至少6个字符,最多18个字符！", nullmsg = "请填写信息！" } )
                                <div class="passwordStrength">密码强度： <span>弱</span><span>中</span><span class="last">强</span></div>
                            </dd>
                        </dl>
                        <dl>
                            <dt>确认密码</dt>
                            <dd>
                                @Html.Password("ComUSER_PWD","", new { @class = "input normal form-control", recheck = "USER_PWD", datatype = "*6-18", errormsg = "两次输入的密码不一致！", nullmsg = "请填写信息！" })
                            </dd>
                        </dl>

                        <dl>
                            <dt>上次修改时间</dt>
                            <dd>
                                @Html.DisplayFor(m => m.LAST_PASS_TIME,  new { @class = "input normal form-control" })
                            </dd>
                        </dl>
                        @Html.HiddenFor(m => m.USER_ID)

                    </div>
                    <div class="from-footer">
                        <div class="btn-wrap" style="position: fixed;">
                            <a class="btn btn-sm btn-primary radius" onclick="savefrom()">
                                <i class="iconfont icon-save"></i>
                                提交保存
                            </a>
                            <a class="btn btn-sm btn-warning radius" onclick="parent.subcloseTab('f16')">
                                <i class="iconfont icon-fanhui"></i>
                                取消关闭
                            </a>
                        </div>
                    </div>
                }
            </div>
        </div>
    </div>
</div>

@section scripts{
    <script src="@Url.Content("~/Content/JS/common/WdatePicker/WdatePicker.js")"></script>
    <script type="text/javascript" charset="utf-8" src="@Url.Content("~/Content/JS/common/jquery/Validform_v5.3.2_min.js")"></script>
    <script type="text/javascript" charset="utf-8" src="@Url.Content("~/Content/JS/common/jquery/passwordStrength-min.js")"></script>
    <script type="text/javascript" charset="utf-8" src="@Url.Content("~/Content/JS/common/artdialog/dialog-plus-min.js")"></script>
    <script type="text/javascript" charset="utf-8" src="@Url.Content("~/Content/JS/common/webuploader/webuploader.min.js")"></script>
    <script type="text/javascript" charset="utf-8" src="@Url.Content("~/Content/editor/ueditor.config.js")"></script>
    <script type="text/javascript" charset="utf-8" src="@Url.Content("~/Content/editor/ueditor.all.min.js")"></script>
    <script type="text/javascript" charset="utf-8" src="@Url.Content("~/Content/editor/lang/zh-cn/zh-cn.js")"></script>
    @*<script type="text/javascript" charset="utf-8" src="../js/uploader.js"></script>*@

    <script src="@Url.Content("~/Content/JS/common/from.js")"></script>
    <script>
        $(function () {
            //初始化表单验证
            $("#ChangPwdfrom").Validform({
                tiptype: 2,
                usePlugin: {
                    passwordstrength: {
                        minLen: 6,
                        maxLen: 18
                    }
                }

            });
            function savefrom() {
                $("#ChangPwdfrom").submit();
            }
        });
    </script>

}
